Everything in the code is working as advertised, including retrieval of the
timecode below. I had expected that the datestamp would be in the userbits
(.timecode.dwUser). But it isn't. Am I looking in the wrong place?
IAMTimecodeReader *mTimeCoder = (previously set and working);
TIMECODE_SAMPLE tcs;
tcs.dwFlags = ED_DEVCAP_TIMECODE_READ;
mTimeCoder->GetTimecode(&tcs);
timecode is in tcs.timecode.dwFrames.
Thanks in advance.
Chris
"Christopher" <c...@softhome.net> wrote in message
news:#bba1R29BHA.1940@tkmsftngp04...
So either this is still the wrong place to look, or I'm missing something
fundamental, because I now have more information yet am more confused.
Perhaps I have to go to the ioctl level? Does msdv.sys mask something it
shouldn't?
If I ever get this to work I'll post the code fragments. I'd thought
everyone and his brother had done this already.
Thanks.
"The March Hare" <ph...@ndsm.maps> wrote in message
news:#i9iy629BHA.2304@tkmsftngp04...
> I haven't done this myself yet, but I think you need to use a raw device
> command via IAMExtTransport::GetTransportBasicParameters(sounds like
> fun--even the method name is confusing). See the DX 8.1 docs "Issuing Raw
> AV/C Commands" which gives an example of sending a seek command in raw
> format which is used in the DVapp sample. The raw commands are documented
> at www.1394ta.org.
>
>
> "Christopher" wrote in message
"Christopher" <ctn_spam_...@softhome.net> wrote in message
news:OvQ4rgE#BHA.2080@tkmsftngp05...
Here's the fragments as promised.
typedef struct {
BYTE bytes[80];
} DV_DIFBlock;
typedef struct {
DV_DIFBlock header[1];
} DV_Header;
typedef struct {
DV_DIFBlock subcode[2];
} DV_Subcode;
typedef struct {
DV_DIFBlock skip[2];
BYTE skip48[48];
BYTE magic_60;
BYTE magic_FF_1;
BYTE magic_FF_2;
BYTE PAL20;
BYTE magic_FF_3;
BYTE magic_61;
BYTE magic_33;
BYTE aspect_16x9_CF;
BYTE magic_FD;
BYTE magic_FF_4;
BYTE magic_62;
BYTE magic_FF_5;
BYTE day:5; //max = 0x31
BYTE msb_day:3;
BYTE month:5; //max = 0x12
BYTE msb_month:3;
BYTE year; //max = 0x99
BYTE magic_63;
BYTE magic_FF_6;
BYTE second:6; //max = 0x59
BYTE msb_second:2;
BYTE minute:6; //max = 0x59
BYTE msb_minute:2;
BYTE hour:6; //max = 0x23
BYTE msb_hour:2;
BYTE skip12[12];
} DV_Vaux;
typedef struct {
DV_DIFBlock bytes[144];
} DV_AVData;
typedef struct {
DV_Header header;
DV_Subcode subcodes;
DV_Vaux vaux;
DV_AVData avdata;
} DV_DIFSequence;
typedef DV_DIFSequence DV_Frame_NTSC[10];
typedef DV_DIFSequence DV_Frame_PAL[12];
... in CMyInputPin::Receive(IMediaSample *pSample)
hr = pSample->GetPointer(&pbData);
if (FAILED(hr)) {
return hr;
}
#define BCD(x) (((x & 0xf0) >> 4) * 10 + (x & 0x0f))
DV_Frame_PAL *frame = (DV_Frame_PAL *) pbData;
DV_DIFSequence *s0 = frame[0];
int year = BCD(s0->vaux.year);
int month = BCD(s0->vaux.month);
int day = BCD(s0->vaux.day);
int hour = BCD(s0->vaux.hour);
int minute = BCD(s0->vaux.minute);
int second = BCD(s0->vaux.second);
...
TIA.
"Christopher" <ctn_spam_...@softhome.net> wrote in message
news:uU9ESLR#BHA.2396@tkmsftngp05...
> BYTE day:5; file://max = 0x31
> BYTE msb_day:3;
> BYTE month:5; file://max = 0x12
> BYTE msb_month:3;
> BYTE year; file://max = 0x99
>
> BYTE magic_63;
> BYTE magic_FF_6;
> BYTE second:6; file://max = 0x59
> BYTE msb_second:2;
> BYTE minute:6; file://max = 0x59
> BYTE msb_minute:2;
> BYTE hour:6; file://max = 0x23
BYTE day:5; file://max = 0x31
sorry, can't read that....
Please help
TIA
"Christopher" <ctn_spam_...@softhome.net> wrote in message
news:uU9ESLR#BHA.2396@tkmsftngp05...
> BYTE day:5; file://max = 0x31
> BYTE msb_day:3;
> BYTE month:5; file://max = 0x12
> BYTE msb_month:3;
> BYTE year; file://max = 0x99
>
> BYTE magic_63;
> BYTE magic_FF_6;
> BYTE second:6; file://max = 0x59
> BYTE msb_second:2;
> BYTE minute:6; file://max = 0x59
> BYTE msb_minute:2;
> BYTE hour:6; file://max = 0x23
I'm guessing it's a C++ comment (//) that the email program thought was a
file URL so prefixed "file:" giving the odd result. Just delete the "file:"
part.
"Henrik Lynge" <h...@privat.dk> wrote in message
news:eAwOTwq#BHA.2344@tkmsftngp02...
"Christopher" <ctn_spam_...@softhome.net> wrote in message
news:uU9ESLR#BHA.2396@tkmsftngp05...
SUCCEED_OR_RELEASE(mCaptureGraphBuilder->FindInterface(&PIN_CATEGORY_CAPTURE
,
&MEDIATYPE_Video,
mBaseFilter,
IID_IAMTimecodeReader,
(void
**)&mTimeCoder));
... elsewhere ...
TIMECODE_SAMPLE tcs;
tcs.dwFlags = ED_DEVCAP_TIMECODE_READ;
mTimeCoder->GetTimecode(&tcs);
timecode is in tcs.timecode.dwFrames
"The March Hare" <ph...@ndsm.maps> wrote in message
news:OTPM8Us#BHA.2164@tkmsftngp04...
any help is good help
TIA
Henrik Lynge
"The March Hare" <ph...@ndsm.maps> wrote in message
news:e8LM6Ts#BHA.1828@tkmsftngp05...
Sorry about the confusion. It is just a bit field defining the first 5 bits
(the :3 on the next one is the next 3 bits of that byte). It's just so you
don't have to do a lot of bit shifting yourself. My old eyes didn't pickup
on the ":" with the proportional font my OutlookExpress newsreader uses.
The blue "file://" was much easier to see :)
Here's a link to an MS explanation:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang98/ht
ml/_pluslang_c.2b2b_.bit_fields.asp
"Henrik Lynge" <h...@privat.dk> wrote in message
news:uuUNR20#BHA.1828@tkmsftngp05...
CComQIPtr<IAMTimecodeReader, &IID_IAMTimecodeReader> timecode_reader;
timecode_reader = m_dx->dv_camera; // CComPtr<IBaseFilter> dv_camera
if (!timecode_reader)
return E_NOINTERFACE;
hr = timecode_reader->GetTimecode(&sample);
"Christopher" <ctn_spam_...@softhome.net> wrote in message
news:Og261u0#BHA.2164@tkmsftngp04...
> Thanks for posting this info. Where can I get the DV stream data
> definitions?
Try a Google search. I was able to find some decent info that way. IIRC,
there is an open source DV project among other things.
--
Please read this before replying:
1. Learn about newsgroups - http://dev.6581.com/newsgroups.html
2. Trim & respond in-line (please don't top post or snip everything)
3. Benefit others - follow up if you are helped or you found a solution